Network processors often are employed in a network device to handle transmission of data into and out of the network device. The network processor receives data via one or more input ports and may store the received data in a system memory. The network processor may include one or more output ports that are each coupled to a network connection. Data received by the network processor and stored in the system memory may be retrieved from the system memory and transmitted from the network processor via one of the output ports and network connections. At any given time, the system memory receives commands to retrieve data to be transmitted from one or more output ports of the network processor.
A problem arises when data is to be transmitted from one or more output ports of the network processor at a high speed. Because the system memory is of a limited bandwidth, the network processor may not be able to retrieve information from the system memory fast enough to accurately transmit data from each of the output ports. More specifically, the system memory bandwidth may cause a delay in the transmission of data from a first output port while it is retrieving data to be transmitted from a second output, and vice versa. For an ATM (Asynchronous Transfer Mode) data type, a delay in the transmission of data from an output port does not corrupt the data. However, for Ethernet data types, a delay in the transmission of data from an output port corrupts the data; and the receiving end (e.g., a network device coupled to the output port via the network connection) will the detect data corruption and request retransmission of the data. Therefore, the network processor must retransmit the data. If the first port causes delays in the transmission of data from the second port and the second port causes delays in the transmission of data from the first port, the network processor must retransmit data from both ports. However, the same problem may occur during the retransmission of data. Consequently, the network processor may continuously attempt to retransmit the same data, causing no data to be transmitted from the network processor.
Although increasing the system memory bandwidth may avoid the above problem, it is an expensive solution. Alternatively, the above problem may be avoided by only transmitting data of the ATM data type. However, network processors may need to transmit data of a plurality of data types. Therefore, improved methods and apparatus of allocating memory bandwidth in a network processor are needed.